<?php
class Security{
	/**
	 *
	 * Enter description here ...
	 *
	 * @param String $login
	 * @param String $pass
	 *
	 * @return String
	 */
	public static function hash($key, $data, $salt = SALT){

		$hash = hash_hmac(HASH, $data, $key);

		$pos = ((crc32($salt) & 0x0f) % 9) - 4;

		$pos += strlen($hash)/2;

		$hash = substr_replace($hash, "", $pos, 1);

		return $hash;
	}
}